
import { changeCount } from './store/modules/count'
import { useSelector, useDispatch } from 'react-redux'

function Count() {

    const count = useSelector(state => state.count.count)

    const dis = useDispatch()

    return <>
        <h1>Count ---- {count}</h1>
        <button onClick={() => {
            dis(changeCount(1))
        }}>点击加 1</button>
    </>
}

export default Count